GetPages(Predicate<PageIndexItem>) Method

Example 

Predicate used to filter through all pages of the site.
Get all pages based on a specified predicate.

Syntax

'Declaration
 
Public Overloads Shared Function GetPages( _
   ByVal match As Predicate(Of PageIndexItem) _
) As PageCollection

Parameters

match
Predicate used to filter through all pages of the site.

Return Value

Returns a collection of all pages that matches the predicate.

Example

Get all pages from the site that are published and have the flag visible in sitemap set.Get all pages which page name starts with 'M'
var pagesVisibleInSitemap = PageFactory.GetPages(x => x.IsAvailable && x.VisibleInSiteMap);
var pages = PageFactory.GetPages(x => x.PageName.StartsWith("M"));

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

This documentation was created using Document! X from Innovasys